home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech's Sprocket™ / Sprocket (original from 1994) / SprocketSample / DocWindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-20  |  1.5 KB  |  68 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        DocWindow.h
  3.  
  4.     Contains:    A simple document window
  5.                 
  6.     Written by: Dave Falkenburg
  7.     
  8.     Copyright:    © 1993-94 by Dave Falkenburg, all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.      
  12.          <2>      9/4/94    DRF        Added scroll bars and revised dragging methods.
  13.  */
  14.  
  15. #ifndef        _DOCWINDOW_
  16. #define        _DOCWINDOW_
  17.  
  18. #ifndef        _WINDOW_
  19. #include    "Window.h"
  20. #endif
  21.  
  22. #ifndef        __THREADS__
  23. #include    <Threads.h>
  24. #endif
  25.  
  26. class    TDocWindow    :    public TWindow
  27.     {
  28. public:
  29.                             TDocWindow();
  30.     virtual                 ~TDocWindow();
  31.  
  32.     virtual WindowPtr        MakeNewWindow(WindowPtr behindWindow);
  33.  
  34.     virtual    void            AdjustCursor(EventRecord * anEvent);
  35.  
  36.     virtual void            Activate(Boolean activating);
  37.     virtual void            Draw(void);
  38.     virtual void            Click(EventRecord * anEvent);
  39.  
  40.     virtual void            AdjustForNewWindowSize(Rect * oldRect,Rect * newRect);
  41.  
  42.     virtual    Boolean            Close(void);
  43.     
  44.     virtual    OSErr            DragEnterWindow(DragReference theDrag);
  45.     virtual    OSErr            DragInWindow(DragReference theDrag);
  46.     virtual    OSErr            DragLeaveWindow(DragReference theDrag);
  47.     virtual    OSErr            HandleDrop(DragReference theDrag);
  48.  
  49. //    new methods
  50.  
  51.     virtual    void            DoControlAction(ControlHandle whichControl,short whichPart);
  52.     virtual void            SpinHeaderArrows();
  53.  
  54. protected:
  55.     static    unsigned long    fgUntitledTagCount;
  56.  
  57.     ControlHandle            fVerticalScroll,fHorizontalScroll;
  58.     Boolean                    fVerticalScrollActive,fHorizontalScrollActive;
  59.  
  60.     ThreadID                fSpinnerThreadID;
  61.     short                    fCurrentSpinningArrowIconID;
  62.  
  63.     RgnHandle                fDragTargetRgn;
  64.     Boolean                    fCanAcceptDrag;
  65.     };
  66.  
  67. #endif
  68.